using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Globalization;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using EYDIngenieria.ERP.Aplicacion.Gestion;
using EYDIngenieria.ERP.Aplicacion.Mantenedores;
using EYDIngenieria.ERP.ObjetosDeNegocio.Dominio;

public partial class Gestion_IngresoOC : System.Web.UI.Page
{
   private MantenedorAsientoContable  mantenedorAsientoContable = new MantenedorAsientoContable();
    private MantenedorDesglose mantenedorDesglose = new MantenedorDesglose();
    
   
    protected void Page_Load(object sender, EventArgs e)
    {
        dtlAsiento.DataSource = mantenedorAsientoContable.Listar();
        dtlAsiento.DataBind();
        AsientoContable asiento;
      
        foreach (DataListItem item in dtlAsiento.Items)
        {
            int id = int.Parse(((Label)item.FindControl("lblId")).Text);
            asiento = new AsientoContable();
            asiento.Id = id;
            ((DataList)item.FindControl("dtlDesglose")).DataSource = mantenedorDesglose.BuscarporAsiento(asiento);
            ((DataList)item.FindControl("dtlDesglose")).DataBind();

        }
    }

    
}
